package cc.demo02;

import java.lang.reflect.Field;
import java.util.jar.Pack200;

/**
 * @author ${崔灿}
 * @date 2022/10/27 09:39
 **/

public class Test {
    public static void main(String[] args) throws Exception {

        Class<Student> studentClass1 = Student.class;
        Field[] fields = studentClass1.getFields();
        for(Field field : fields) {
            System.out.println(field);
        }
        Field student = studentClass1.getField("name");
        System.out.println(student);
    }
}


class Student extends People {
    public String name;
    private Integer age;
}
class People{
    public String address;
    private Integer id;
}

